package org.tulkas.robot.http.headers;

/**
 * @author <a href="mailto:tulkas.web@gmail.com">Tulkas</a>
 *
 */
public class CacheControls {
	public static final RequestCacheControls REQUEST = new RequestCacheControls();
	public static final ResponseCacheControls RESPONSE = new ResponseCacheControls();

	public static class RequestCacheControls {
		public final String NO_CACHE = "no-cache";

		public final String NO_STORE = "no-store";

		public final String MAX_AGE(int seconds) {
			return "max-age=" + seconds;
		}

		public final String MAX_STALE(int seconds) {
			return "max-stale=" + seconds;
		}

		public final String MIN_FRESH(int seconds) {
			return "min-fresh=" + seconds;
		}

		public final String NO_TRANSFORM = "no-transform";

		public final String ONLY_IF_CACHED = "only-if-cached";
	}

	public static class ResponseCacheControls {
		public final String PUBLIC = "public";

		public final String PRIVATE = "private";

		public final String NO_CACHE = "no-cache";

		public final String NO_STORE = "no-store";

		public final String NO_TRANSFORM = "no-transform";

		public final String MUST_REVALIDATE = "must-revalidate";

		public final String PROXY_REVALIDATE = "proxy-revalidate";

		public final String MAX_AGE(int seconds) {
			return "max-age=" + seconds;
		}

		public final String X_MAXAGE(int seconds) {
			return "x-maxage=" + seconds;
		}

	}

}
